package com.example.spinning.mapper;

import com.example.spinning.bean.EndProductOutStock;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EndProductOutStockMapper {

    //得到出库单
    List<EndProductOutStock> getEndProductOutStock(@Param("start") Integer start, @Param("count") Integer count);

    //查找表的行数
    int getCountEndProductOutStock();

    //根据名字查找表的行数
    int getCountEndProductOutStockByCondition(
            @Param("date") String date,
            @Param("receiver") String receiver,
            @Param("norms") String norms,
            @Param("batch_no") String batch_no);

    //根据id查找产品
    EndProductOutStock getEndProductOutStockById(Long id);

    //根据条件查询出库单
    List<EndProductOutStock> getEndProductOutStockByCondition(
            @Param("start") Integer start,
            @Param("count") Integer count,
            @Param("date") String date,
            @Param("receiver") String receiver,
            @Param("norms") String norms,
            @Param("batch_no") String batch_no);

    //增加
    int addEndProductOutStock(EndProductOutStock outStock);

    //修改
    int updateEndProductOutStockById(EndProductOutStock outStock);

    //删除
    int delEndProductOutStockById(@Param("ids") String[] ids);


}
